-
Write something in the document below!
- There is at least one public document in every node in the Agora. Whatever you write in it will be integrated and made available for the next visitor to read and edit.
- Write to the Agora from social media.
-
Sign up as a full Agora user.
- As a full user you will be able to contribute your personal notes and resources directly to this knowledge commons. Some setup required :)
Betula is a single-user self-hosted bookmarking tool for the independent web. It is simple to run and use. I started making it at the end of 2022. It is my main project currently. When I program, I usually program Betula.
=> https://betula.mycorrhiza.wiki | Website => https://fosstodon.org/@betula | Fediverse @betula@fosstodon.org => https://codeberg.org/bouncepaw/betula | Repository
= Some Betulæ I know of
The first one is mine! As you can see, the pattern of using links or betula as the subdomain has emerged.
=> https://links.bouncepaw.com => https://links.flancia.org => https://links.danilax86.space => https://links.riskiwah.xyz => https://links.hd-dn.com => https://links.ihatereality.space/ => https://links.goldstein.rs => https://betula.trickyfoxy.ru => https://links.ndpi.io => https://betula.klava.wiki => https://links.khinah.xyz => https://links.johv.dk => https://links.compost.party
Note that every instance is one-person only! Want to have your own Betula? Set up your instance. Having problems? Contact me.
= Relation to [[Mycorrhiza]] Both projects are part of the [[Mycoverse]]. What does it mean now? Not much, except it means that both projects are heavily connected ideologically and will be connected technically in the future.
Both projects use [[Mycomarkup]] as the only markup language.
= How to reset password?
*. Open your Betula file with sqlite3.
*. Run delete from BetulaMeta where Key like 'Admin%';
*. Restart Betula.
*. Betula will prompt you for a new username and password when you open it.
= Simplest bookmarklet This one is obsolete. An advanced bookmarklet is built in Betula itself (visit the Bookmarklet page). But if you want it, here it is.
javascript:window.open(%22https://links.bouncepaw.com/save-link?url=%22+window.location.href+%22&title=%22+document.title,'_blank')
Change the URL with your own.
Read more about the bookmarklet: => Betula bookmarklet
= After releasing v1.3 => https://merveilles.town/@bouncepaw/112589340477407307 | Mastodon thread 1/4 Thoughts after the recent Betula release
I think I should get a separate domain for Betula at some point. Domains like betula.* are all taken, which makes no surprise to me, because this is a cool short word. Something like joinbetula.* (akin to the Fediverse tradition) or betulanet.* is manageable. Maybe the-betula.*?
2/4 Also, [[somebody posted Betula on HackerNews]], and it remained on the front page for the whole day. It doubled the number of stars on GitHub, which is fun, because it's just a mirror; the number is still two-digit, but it's big enough to impress, because most repos barely get more than 10. It also brought two subscribers to my Betula! It's not much, but I believe in slow growth.
3/4 The discussions on HackerNews are not that interesting. Most of commenters compared Betula to other bookmarking solutions and approaches; this is valid, but boring. Also, people wondered what the word Betula means and whether it comes from Hebrew. No, it does not, it means Birch in Latin, my favorite tree.
I thank people who answered the questions for me. I don't have an account there.
Nevertheless, I had fun reading them and being on the front page.
4/4 Also, the Betula Nix package maintainer reported an embarrassing bug which I had to fix quickly and release a hotfix. There's never enough testing! No unit tests would've caught that...
++NB. Archival was implemented in v1.4.0. This document is of historical interest.++
This article outlines a vision for a built-in web archival solution in [[Betula]]. This might not be what exactly will happen. Just thinking out loud!
= Problem Links rot. To prove the point, I took the 900+ URL:s found in my Betula file. I am currently fetching each of them to see how many of them rotted.
If one archives a web page, they no longer depend on the original page to exist. That's a good thing. Less traffic going across the globe is also good.
= Prior art There is the Web Archive.
There is [[ArchiveBox]]. It's not really nice to use...
Bookmarks: => links>/tag/archive | The #archive tag on my Betula => https://links.bouncepaw.com/search?q=%23archive+betula | Bookmarks that are directly useful to implementing archival in Betula
= What to archive? I see two major approaches:
*. Save all. A complete copy of the stuff on the page. *. Save the essentials. What matters. For a text page, that would be the text itself sans the navigation, advertisements.
Both are complex!
Saving all means saving a lot! My Betula DB currently is half a megabyte for all links. A normal page weighs something about that! Saving the essentials is not easy. How do we determine what is essential? [[Readability.js]], a well-known JavaScript library for getting the essential text from a web page, has around 70 contributors. I will get 3 contributors for that task //at best//.
= Considering What if we make a really simple essential-text-extraction algo that is idk 60 % of time useful. And then we let the human operator //edit// the produced copy! They could annotate them in whatever way. Fix the errors.
Maybe let them upload attachments? Browsers have PDF-printing now. Maybe upload these prints?
The copies would be private, accessible only to the owner of a given Betula.
= Implementation
I want this all to fit in the single Betula binary! And the archived copies gotta be small for the Betula data file to be portable. Maybe prompt for every image? And then compress them if imagemagick is found on the machine?
Somebody could make a good bachelor thesis out of this. UPD. That'll be me.
[[Betula]] is a tool for saving bookmarks, lots of them. The usual way of saving them is as follows: you open Betula, you press //Save bookmark// and write in all the details you want (only URL is required, the title is often guessed correctly, description and tags are optional). It's fine, but once you get to serious bookmarking (tens or hundreds or thousands of them), you get tired of that. You want to go faster. A common question I get in this regard is “Do you have a browser extension?”. No, there isn't one as of now, as far as I'm concerned. In this note I'll tell you how to live without it.
To begin with, let me tell you about a technology called bookmarklets. I would've linked a good article about them, but I don't know any, so I'll explain in my own words. Bookmarklet is a bookmark with the URL that has javascript: scheme. After the scheme, an encoded JavaScript code follows. When you click this bookmark in your bookmark bar, the code gets executed in the current page context.
JavaScript with its DOM API is the best language to manipulate web page contents. Many things can be done with it. A bookmarklet that saves current page into Betula? Easy! I made this little bookmarklet in a few minutes:
javascript:window.open(%22https://links.bouncepaw.com/save-link?url=%22+window.location.href+%22&title=%22+document.title,'_blank')
But do not use it! Betula is shipped with a much better bookmarklet, contributed by a wonderful person:. Besides popping up a bookmark saving window, it also pre-fills title and inserts the selected (with cursor selection 🖱) text. High-tech!
=> https://git.sr.ht/~bouncepaw/betula/tree/master/item/web/bookmarklet.js | Betula bookmarklet source code
To install it into your bookmark bar, in your Betula, go Your profile > Bookmarklet. Then drag-and-drop the link there. If you can't drag-and-drop, make a bookmark of any other page and replace its URL with the bookmarklet URL.
It works in every browser I tried, including mobile browsers! I save almost every bookmark with it on both my laptop and phone, it works fine.
NB. You might come across Internet Archive pages not being saved. They messed up something in DOM API for some reason. Save pages hosted on the Internet Archive the direct way instead.
NB. To access the bookmarklet in Android Chrome, tap the address bar and type the name of the bookmarklet. Then click it. You might want to rename it for easier access.
= Hotkey What about hotkeys? Some browsers provide special hotkeys to access the first nine bookmarks in the bookmark bar. I have my bookmarklet the first in the bar. I use Safari, I press Cmd+Alt+1 to access it. Some browsers do not provide such hotkeys, but basically all browsers beside Safari have advanced extension ecosystems, and there are extensions to enable such hotkeys. I will not link any here, because I myself haven't tried any of them.
Maybe you could even override the browser's default Ctrl+D?
A federated search system is one of the features I want to pursue in [[Betula]]. Per my plan, it will be part of my Bachelor's thesis. The whole model is quite simple, and I'm describing it here for future reference.
What is federated search? Federated search is a feature that lets you see bookmarks from other bookmark servers, which are Betula instances, most of the time, but due to the federated nature of Fediverse, this is not guaranteed. Compared to regular search, which is straight forward to come up with, federated search needs technical and ethical considerations.
Consent. According to my intuition, federated search should be enabled only if they are //mutuals//. Being mutuals doesn't really mean much on the Internet, but it does imply some level of trust between the actors. In the future, profile flags like //Everyone can search me//, //Mutuals of my mutuals can search me// or //Even mutuals cannot search me// might also make sense.
Where the search is done. Other Fediverse software usually stores every incoming Note there is, and the search is conducted on it then. This approach makes sense and doesn't make many network requests. I however would like to make many network requests instead, because it gives other instances more agency, makes architecture simpler and ensures matching bookmarks are up-to-date. Introducing some caching is a good idea at some point, but it's not a priority.
Search privacy. When a federated search is made, every mutual gets notified about that. Knowing that, and knowing that a federated search is something one would explicitly want to do, rather than do all the time, I think federated search and regular search should be different actions.
img { https://private-user-images.githubusercontent.com/22562024/363702851-a88fbc5f-babe-4da1-9278-ecdec599ea82.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyODM2OTgsIm5iZiI6MTcyNTI4MzM5OCwicGF0aCI6Ii8yMjU2MjAyNC8zNjM3MDI4NTEtYTg4ZmJjNWYtYmFiZS00ZGExLTkyNzgtZWNkZWM1OTllYTgyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDEzMjMxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0NTE5Yjk4YTkzZDlhMGM5M2RkMDYyZWVlNWI3YTUxNTYyMTMzNzZlMDM3ZDMxNTdjYTg4NDVhNWRmMTExMjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TVolesmVjUVvQ74PPl3zZNPXGdvZFSjlsBQW7chHHtQ { On this picture you see the //Search mutuals too// button on the regular search page. You press it and only after that you see federated results. This way is explicit. Maybe it should be a checkbox instead. }}
Protocol. The same endpoint as regular search, but with an AP-related Accept header. It would return a Collection object with Notes that are the same as those sent to inboces. Mutuality is to be checked too, of course.
= See also => links>/tag/federated_search
Betula sites want to be federated and shared, at least they pretend to. In this note I describe how Betulae can be included in [[Agora]], given no additional federation capabilities are added to Agora^^1^^.
++This document is outdated. See [[https://git.agor.ai/bouncepaw]] repos for an actual implementation, and [[https://anagora.org/@bouncepaw-betula]] and [[https://anagora.org/@bouncepaw-flancian]] to see how it looks in Agora.
= Algorithm
*. In [[Flancia]], there is a [[Betula]].
*. Daily, an unauthenticated script fetches /cat to see all categories. It is unauthenticated, so no private links leak. There is also a git repository set up.
*. For each category:
**. Create a file called <category name>.myco.
**. Write {
= <category name>
<category description>
} **. For each link in category: ***. Write {
== <link title> ([[<post url> | on Betula]])
[[<link url>]]
<link description>
*. An Agora then fetches the repository somehow.
Note that the link description is formatted in Mycomarkup^^2^^. It can thus be inserted verbatim. But what if the Betula administrator writes descriptions that break the formatting of further links in the resulting document? So be it. } *. {
git add .
git commit -m `date "+%Y-%m-%d"`
git push
}
= Footnotes ^^1^^ Id est Agora continues to aggregate [[Git]] repositories. Currently, Agora has a poor support of [[Mycomarkup]], but [[Flancian]] wanted to improve it, and I believe he will, so I'm not considering Mycomarkup support to be an obstacle. In the future, a [[anagora>agora.yaml]] convention might arise, thus removing the need for such a script.
^^2^^ Perhaps, Betula could provide a special API for exporting categories in such Mycomarkup documents. /cat-as-myco/ or something. Less requests is better.
First attempt on how a [[Betula]] mascot might look like. Everyone says it is a broccoli. Will not dispute, though it is a birch.
- public document at doc.anagora.org/betula-|-бетулу
- video call at meet.jit.si/betula-|-бетулу